
import requests
import json
import time


def openDoor():
    url1 = "http://192.168.10.134:8090/devserver/accessControl"
    datas = {
        "device_sn":"GX3APSQVXW",
        "wait_time":"3000",
        "action":"1"
    }
    headers ={"Content-Type":"application/json"}

    r = requests.post(url=url1,headers=headers,data=json.dumps(datas))
    print(r.status_code)  # 获取响应状态码
    print(r.content)  # 获取响应消息
    time.sleep(2)
if __name__ == '__main__':
    for i in range(100):
        openDoor()

